Skip to content

fix(ios): send input through dtuhidd on Xcode 27 simulators - #91

Merged
NathanWalker merged 2 commits into
mainfrom
fix/xcode-27-dtuhid-input
Nov 11, 2026
Merged

NathanWalker merged 2 commits into
mainfrom
fix/xcode-27-dtuhid-input

Conversation

@NathanWalker

@NathanWalker NathanWalker commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #90.

On Xcode 27 simulators, taps, Home, hardware buttons and keys returned ok and did nothing.

From CoreSimulator 1155.4 (Xcode 27), the guest routes HID through a new daemon, dtuhidd. Legacy Indigo messages from SimulatorKit's HID client are still accepted, and the guest then drops them. So sendWithMessage: succeeding proved nothing.

What changes

When the loaded CoreSimulator is 1155.4 or newer, the display bridge sends input to dtuhidd's digitizer service (com.apple.coredevice.feature.remote.hid.digitizer) as XPC dictionaries.

  • Version check: it reads the loaded CoreSimulator bundle, not the selected Xcode. The Xcode installer replaces that framework system-wide.
  • New DFDTUHIDClient:
    • Connects with -[SimDevice lookup:error:], xpc_endpoint_create_mach_port_4sim, and xpc_connection_enable_sim2host_4sim.
    • Confirms a live daemon with a barrier request before first use, retrying while it starts. dtuhidd can abort during boot while its service lookup keeps succeeding.
    • Tracks contacts as start, position, and end, and starts a new contact if the connection was interrupted mid-gesture.
  • Routed through it: single, edge, and two-finger touches; Home; the App Switcher; hardware buttons (as HID usages); and keyboard usages, including sendKeyCode with modifiers.
  • Unchanged: scroll and the Digital Crown stay on Indigo. Every toolchain before 1155.4 keeps the existing Indigo path exactly as it was.
  • No dtuhidd equivalent: Apple Pay and the software-keyboard toggle are legacy button codes, so they return a clear error instead of a silent no-op.
  • Docs: AGENTS.md documents the path.

The wire format follows idb's DTUHID transport (facebook/idb FBSimulatorControl/HID), which documents the message shapes and the 1155.4 cutover.

Testing

Setup: macOS 26.6, Xcode 27.1 (CoreSimulator from Xcode 27), iPhone 17 Pro simulator on iOS 27.0. This was built on top of #87, which is still needed on Xcode 27 for the display to load at all.

Action Before After
simdeck home ok, no effect Returns to SpringBoard
simdeck tap --label toolbox ok, no effect Opens the app
Coordinate taps ok, no effect Navigate in the app
simdeck key-combo --modifiers cmd --key a and simdeck type ok, no effect Edit a text view

Also:

  • The browser viewer streams the same simulator. Input from the viewer goes through the same bridge methods, but I only exercised it from the CLI.
  • npm run build:cli is clean, with no new warnings.

Not tested on device: Xcode 26 and older, where nothing should change because the Indigo path runs unchanged.

Separately, dismiss-keyboard sends Escape (usage 41), which iOS 27 doesn't treat as "hide keyboard" in a text view. That's unrelated to the transport and left as is.

CoreSimulator 1155.4 (Xcode 27) routes guest HID through dtuhidd. The guest
accepts legacy Indigo messages from SimulatorKit's HID client and drops them,
so taps, Home, hardware buttons and keys reported success and did nothing.

When the loaded CoreSimulator is 1155.4 or later, touches (single, edge and
two-finger), Home, the App Switcher, hardware buttons and keyboard usages go
to dtuhidd's digitizer service as XPC dictionaries instead. Older toolchains
keep the Indigo path unchanged.

Fixes #90
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 672336ac-1012-489b-8ade-31b670d2237c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
simdeckciproxy 3327f00 Commit Preview URL

Branch Preview URL
Nov 11 2026, 04:36 AM

@NathanWalker
NathanWalker merged commit 7234a51 into main Nov 11, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS touch and button input has no effect on Xcode 27 simulators (with #87 applied)

1 participant